package students_files_test01;

import java.util.ArrayList;
import java.util.Iterator;

public class Sales implements Iterable<Order>{

    private ArrayList<Order> orders;

    public Sales(){
        orders = new ArrayList<>();
    }

    @Override
    public Iterator<Order> iterator() {
        return orders.iterator();
    }

    public void addOrder(Order order){
        orders.add(order);
    }

    public int getNumberOfOrders(){
        return orders.size();
    }
}
